package com.cskaoyan.bean;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * @author stone
 * @date 2022/01/03 17:18
 */
@Data
public class User {
    @Length(min = 6)
    String username;
    @Length(min = 6,max = 10,message = "length between 6 and 10")
    String password;
    @Max(100)
    @Min(18)
    Integer age;
}
